<div class="left content_right">
	<script type="text/javascript">
		head.ready(function() {
			$( "#wedding_date" ).datepicker({
				dateFormat: 'dd/mm/yy',
			});
			$('.input').tipsy({trigger: 'focus', gravity: $.fn.tipsy.autoWE, fade: true});
		});	
		function submit(){
			var account_pass 			= $('#account_pass');
			var account_pass_retype 	= $('#account_pass_retype');
			var account_email 			= $('#account_email');
			var account_email_retype 	= $('#account_email_retype');
			var bride_name 				= $('#bride_name');
			var groom_name 				= $('#groom_name');
			var wedding_date 			= $('#wedding_date');
			var wedding_location 		= $('#wedding_location');
			
			if ( account_pass.val() != account_pass_retype.val() ){
				showError ( account_pass_retype , '<?php echo _ERROR_MSG_ACCOUNT_PASS_NOT_MATCH; ?>' );
				return false;
			}

			if ( $.trim(account_email.val()) != '' || account_email.val() != 0 ){
				if ( !isValidEmail( account_email ,'<?php echo _ERROR_MSG_ACCOUNT_EMAIL_NOT_VALID; ?>') ){
					return false;	
				}
				if ( !isValidEmail( account_email_retype ,'<?php echo _ERROR_MSG_ACCOUNT_EMAIL_NOT_VALID; ?>') ){
					return false;	
				}
			}  		

			if ( account_email.val() != account_email_retype.val() ){
				showError ( account_email_retype , '<?php echo _ERROR_MSG_ACCOUNT_EMAIL_NOT_MATCH; ?>' );
				return false;
			}
			
			if ( isEmptyTextBox( groom_name ,'<?php echo _ERROR_MSG_GROOM_NAME_NOT_EMPTY?>' ) ){
				return false;
			}

			if ( isEmptyTextBox( bride_name ,'<?php echo _ERROR_MSG_BRIDE_NAME_NOT_EMPTY?>' ) ){
				return false;
			}
			
			$('#frm_info').submit();
		}

		function dsp_input(type){
			$('#change_'+type).fadeIn();
		}
	</script>
	<?php
		if (isset($_SESSION['error_pass']) && $_SESSION['error_pass']){
			echo '<div class="error">'.$_SESSION['error_pass'].'</div>';
			$_SESSION['error_pass'] = '';
		}

		if (isset($_SESSION['error_email']) && $_SESSION['error_email']){
			echo '<div class="error">'.$_SESSION['error_email'].'</div>';
			$_SESSION['error_email'] = '';
		}
	?>
	<form name="frm_info" id="frm_info" method="post" action="<?php echo URL;?>?a=ACC&acc=USER&user=INFO&info=U">
		<div id="account_info">
			<div class="title"><?php echo _LB_ACCOUNT_INFORMATION ?></div><br/>
			<div class="left w150"><?php echo _LB_ACCOUNT_LINK ?></div>
			<div class="left">
				<?php echo URL.$account_name;?>
			</div>			
			<div class="clear">&nbsp;</div>
			<div class="left w150"><?php echo _LB_ACCOUNT ?></div>
			<div class="left">
				<?php echo $account_name;?>
			</div>			
			<div class="clear">&nbsp;</div>
			<div class="left w150"><?php echo _LB_ACCOUNT_PASS ?></div>
			<div class="left">
				<?php echo '******'; ?>&nbsp;<span class="span_btn" onclick="dsp_input('pass')"><?php echo _LB_CHANGE_PASS; ?></span>
			</div>
			<div class="clear">&nbsp;</div>
			<div id="change_pass" class="none">
				<div class="left w150"><?php echo _LB_ACCOUNT_PASS_CURRENT . _LB_REQUIRED ?></div>
				<div class="left">
					<input class="input" type="password" name="account_pass_current" id="account_pass_current" value="">
				</div>
				<div class="clear">&nbsp;</div>

				<div class="left w150"><?php echo _LB_ACCOUNT_PASS . _LB_REQUIRED ?></div>
				<div class="left">
					<input class="input" type="password" name="account_pass" id="account_pass" value="">
				</div>
				<div class="clear">&nbsp;</div>

				<div class="left w150"><?php echo _LB_ACCOUNT_PASS_RETYPE . _LB_REQUIRED ?></div>
				<div class="left">
					<input class="input" type="password" name="account_pass_retype" id="account_pass_retype" value="">
				</div>
				<div class="clear">&nbsp;</div>
			</div>

			<div class="left w150"><?php echo _LB_ACCOUNT_EMAIL ?></div>
			<div class="left">
				<?php echo $account_email;?>&nbsp;<span class="span_btn" onclick="dsp_input('mail')"><?php echo _LB_CHANGE_EMAIL; ?></span>
			</div>
			<div class="clear">&nbsp;</div>
			<div id="change_mail" class="none">
				<div class="left w150"><?php echo _LB_ACCOUNT_EMAIL_NEW . _LB_REQUIRED ?></div>
				<div class="left">
					<input class="input" type="text" name="account_email" id="account_email" value="" onchange="checkExsitsName(<?php echo ACCOUNT_CHECK_TYPE_EMAIL; ?>)">
				</div>
				<div class="clear">&nbsp;</div>

				<div class="left w150"><?php echo _LB_ACCOUNT_EMAIL_RETYPE . _LB_REQUIRED ?></div>
				<div class="left">
					<input class="input" type="text" name="account_email_retype" id="account_email_retype" value="">
				</div>
			</div>
			<div class="clear">&nbsp;</div>
		</div>

		<div id="couple_info">
			<div class="title"><?php echo _LB_COUPLE_INFORMATION ?></div><br/>
			<div class="left w150"><?php echo _LB_GROOM_NAME . _LB_REQUIRED ?></div>
			<div class="left">
				<input class="input" type="text" name="groom_name" id="groom_name" value="<?php echo $groom_name;?>">
			</div>
			<div class="clear">&nbsp;</div>

			<div class="left w150"><?php echo _LB_BRIDE_NAME . _LB_REQUIRED ?></div>
			<div class="left">
				<input class="input" type="text" name="bride_name" id="bride_name" value="<?php echo $bride_name;?>">
			</div>
			<div class="clear">&nbsp;</div>
		</div>

		<div id="wedding_info">
			<div class="title"><?php echo _LB_WEDDING_INFORMATION ?></div><br/>
			<div class="left w150"><?php echo _LB_WEDDING_DATE?></div>
			<div class="left">
				<input title="<?php echo _INFO_MSG_WEDDING_DATE; ?>" class="input" type="text" name="wedding_date" id="wedding_date" value="<?php echo convertSQLDatetoDate($wedding_date);?>">
			</div>
			<div class="clear">&nbsp;</div>
			
			<div class="left w150"><?php echo _LB_WEDDING_LOCATION ?></div>
			<div class="left">
				<input class="input" type="text" name="wedding_location" id="wedding_location" value="<?php echo $wedding_location;?>">
			</div>
			<div class="clear">&nbsp;</div>
		</div>
		
		<div align="center">
			<a class="button blue" href="javascript:void(0)" onclick="submit();"><span class="label"><?php echo _LB_UPDATE ;?></span></a>
		</div>
	</form>
</div>
<div class="clear">&nbsp;</div>